{include file="public_iframe:head"}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>提现审核</h5>
            <div class="ibox-tools" style="margin-top: -9px;">
                <a href="javascript:history.go(-1);" class="btn btn-primary"><i class="fa fa-arrow-left"></i> 返回</a>
            </div>
        </div>
        <div class="ibox-content">
            <form action="{:url('Set/index')}" method="post" enctype="multipart/form-data" id="brandForm" class="form-horizontal">
                <input type="hidden" name="id" id="id" value="{$withdraw.id}">

                <div class="form-group">
                    <label class="col-sm-2 control-label">提现人</label>

                    <div class="col-sm-6">
                        <input type="text"  class="form-control" value="{$withdraw.name}" placeholder="" min="0" disabled="disabled">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">卡号</label>

                    <div class="col-sm-6">
                        <input type="text"  class="form-control" value="{$withdraw.card_num}" placeholder="" min="0" disabled="disabled">
                    </div>
                </div>

            <div class="hr-line-dashed"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">类型</label>

                    <div class="col-sm-6">
                        {switch name="$withdraw.type"}
                            {case value="1"}支付宝{/case}
                            {case value="2"}银行卡{/case}
                        {/switch}
                      
                    </div>
                </div>
                <div class="hr-line-dashed"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">提现金额</label>

                    <div class="col-sm-6">
                        <input type="text"  class="form-control" value="{$withdraw.money}" placeholder="" min="0" disabled="disabled">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">是否已提现</label>

                    <div class="col-sm-6">
                        <label class="checkbox-inline">
                            <input type="radio" name="status" value="1" {if $withdraw.money eq '1'}checked="checked"{/if}>是
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="status" value="-1" {if $withdraw.money eq '-1'}checked="checked"{/if}>否
                        </label>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <!--<button class="btn btn-primary" type="submit">提交</button>-->
                        <!--href="JavaScript:void(0);" onclick="roleSubmit();"-->
                        <a href="JavaScript:void(0);" onclick="Submit();" class="btn btn-primary" id="submit">提交</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- End Panel Basic -->
</div>
<script>
    function Submit(){
        //询问框
        var index = parent.layer.confirm('请确认钱是否到账在修改？', {
          btn: ['确认','取消'] //按钮
        }, function(){
            var formData = new FormData();        
            var id=$('#id').val();
            var status=$('input[name="status"]:checked').val();

            formData.append('id',id);
            formData.append('status',status);

            $.ajax({
                url:"{:url('Withdraw/detail')}",
                type:'POST',
                data:formData,
                async:false,
                processData:false,
                contentType:false,
                success:function(result){

                    var index = parent.layer.alert(result.msg, {
                      skin: 'layui-layer-molv' //样式类名
                      ,closeBtn: 0
                    }, function(){
                        if(result.code == '1'){
                            parent.layer.close(index);
                            location.href=result.url;
                        }
                    });
                }
            });

        }, function(){
            parent.layer.close(index);
        });
    };
</script>
</body>
</html>